home *** CD-ROM | disk | FTP | other *** search
- Path: rain.fr!news
- From: Fabien Bergeret <fbergeret@nahua.arcanet.fr>
- Newsgroups: comp.lang.c
- Subject: Re: don't understand preprocessor ;-(
- Date: Tue, 12 Mar 96 16:39:14 WET
- Organization: CSI InterNetNews site
- Message-ID: <NEWTNews.826649000.10797.fbergeret@nahua.arcanet.fr>
- References: <4ha2ce$lsv@gwdu19.gwdg.de>
- NNTP-Posting-Host: nahua.arcanet.fr
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- > I want to modify an existing program and don't undertand the following
- > code:
- >
- > #define __far
- >
- > int __far x;
- >
- > Hm, it looks very simpel, but why does a progammer define something
- > to put it infront of a variable? In the progam I want to modify most
- > variables including struct's and register-variables are declared with
- > this preprocessor-instruction. If you can explain the sense of souch an
- > instruction, please send me an email.
-
- One interesting thing, when you program, is the portability of what
- you program. It means that, when you move from an envirnement to another, you
- have to modify as fewe things as possible.
- The idea of far pointers is not really common : it just exist on DOS
- or Windows. It means that it you move your application to another platform,
- the word far will have to disappear. It's probably what happened here : the
- application as been written in DOS, using a Small Memory Model, and then have
- moved to another configuration. The #define __far make the word __far
- disappear as long as #undef __far is not written
-
-